/*
** my_strdup.c for my_strdup in /home/chassa_m/rendu/Piscine-C-lib/my
** 
** Made by chassa_m
** Login   <chassa_m@epitech.net>
** 
** Started on  Thu Nov 28 22:16:45 2013 chassa_m
** Last update Thu Nov 28 22:17:58 2013 chassa_m
*/

#include <stdlib.h>

char	*my_strdup(char *str)
{
  int	i;
  char	*dup;

  i = 0;
  dup = malloc((my_strlen(str) + 1) * sizeof(char));
  while (str[i] != '\0')
    {
      dup[i] = str[i];
      i = i + 1;
    }
  dup[i] = '\0';
  return (dup);
}
